{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "31319bc0",
   "metadata": {},
   "source": [
    "## 飞书接口（czsc.fsa）模块的测试\n",
    "---"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3e146e89",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "欢迎使用CZSC！当前版本标识为 0.10.3@20251003\n",
      "\n",
      "市场上，对任何的股票都不值得产生感情，没有任何股票可以给你带来收益，能给你带来收益的是你\n",
      "的智慧和能力，那中把钱在另一个时间变成更多钱的智慧和能力。股票永远是孙子，被股票所转的，\n",
      "就连孙子都不如了。\n",
      "\n",
      "--摘自《2007-01-30 15:09 教你炒股票26：市场风险如何回避》\n",
      "CZSC环境变量：czsc_min_bi_len = 6; czsc_max_bi_num = 50; \n",
      "C:\\Users\\zengb\\.czsc 目录缓存超过1GB，请适当清理。调用 czsc.empty_cache_path() 可以直接清空缓存\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "sys.path.insert(0, '../..')\n",
    "import os\n",
    "import czsc\n",
    "import dotenv\n",
    "dotenv.load_dotenv(f\"../../.env\", override=True)\n",
    "czsc.welcome()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ef9597df",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[32m2025-11-04 11:21:31.918\u001b[0m | \u001b[1mINFO    \u001b[0m | \u001b[36mczsc.utils.cache\u001b[0m:\u001b[36mis_found\u001b[0m:\u001b[36m74\u001b[0m - \u001b[1m缓存文件已找到, C:\\Users\\zengb\\.czsc\\generate_klines\\407EDFA6_generate_klines.pkl\u001b[0m\n",
      "\u001b[32m2025-11-04 11:21:31.919\u001b[0m | \u001b[1mINFO    \u001b[0m | \u001b[36mczsc.utils.cache\u001b[0m:\u001b[36mget\u001b[0m:\u001b[36m85\u001b[0m - \u001b[1m正在读取缓存记录，地址：C:\\Users\\zengb\\.czsc\\generate_klines\\407EDFA6_generate_klines.pkl\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "dfw = czsc.mock.generate_klines_with_weights(seed=1234)\n",
    "feishu_key = os.getenv(\"FEISHU_KEY\")\n",
    "czsc.fsa.push_strategy_latest(strategy=\"测试策略\", dfw=dfw, feishu_key=feishu_key)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b11bda2c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "CZSC10",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
